package cn.edu.zafu.bigdata.x.huangxihao202211080211;

class book{
    private String title;
    private String author;
    private double price;

    public book(String title,String author,double price){
        this.title=title;
        this.author=author;
        this.price=price;
    }
    @Override
    public String toString(){
        return "book[title="+title+",author="+author+",price="+price+"]";
    }
}

public class RewriteToString {
    public static void main(String[] args){
        book book1=new book("The war","Jone",20);
        book book2=new book("The story of Childhood","Alna",30);
        System.out.println(book1);
        System.out.println(book2);
    }
}
